<template lang="">
    <div>
        <myheader/>
        <h2>用户中心</h2>
        {{user.username}}<br>
        手机号{{user.mobile}}<br>
        头像<br>
    </div>
</template>
<script>
import myheader from '@/components/myheader'
export default {
    data(){
        return{
            user:{},
            userid:localStorage.getItem('userid'),
        }
    },
    methods: {
        getUserinfo(){
            this.$axios.get('users/getuserinfo?userid='+this.userid).then(res=>{
                this.user = res.data.user
            })
        }
    },
    mounted() {
        this.getUserinfo()
    },
    components:{
        'myheader':myheader
    }
}
</script>
<style lang="">
    
</style>